<html>
<head>
<meta charset="UTF-8">
<title>等待条件表修改</title>
<link id="easyuiTheme" id="easyuiTheme" href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/easyui/jquery.cookie.js" type="text/javascript"></script>
<script src="../../static/easyui/ui-theme.js" type="text/javascript"></script>
<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
<script src="../../ffres/dict/all.js" type="text/javascript"></script>
<link href="../../static/easyui/themes/frameless.css" rel="stylesheet" type="text/css"/>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<body class="easyui-layout" scroll="no">
	<form id="ff" method="post">
		<div class="esaas-info-title">等待条件表信息</div>
		<table class="esaas-info-edit-table">
			<tr>
				<td width="15%" align="left">&nbsp;&nbsp;配置标识符：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="pluginConfId" data-options="required:true,disabled:true"
					style="width: 99%; height: 25px;"></input><font color="red">*</font></td>
				<td width="15%" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;配置顺序：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="confSort" data-options="required:true,disabled:true"
					style="width: 99%; height: 25px;"></input><font color="red">*</font></td>
			</tr>
			<tr>
				<td width="15%" align="left">&nbsp;&nbsp;等待项名称：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="checkItemName" data-options="required:false"
					style="width: 99%; height: 25px;"></input></td>
			</tr>
			<tr>
			    <td width="15%" align="left" style="vertical-align: top">&nbsp;&nbsp;等待项SQL：</td>
			    <td width="85%" colspan="3"><input class="easyui-textbox" type="text"
					name="checkItemSql" data-options="required:false, multiline: true"
					style="width: 100%; height: 100px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="left" style="vertical-align: top">&nbsp;&nbsp;等待成功条件：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="checkSucCondition" data-options="required:false"
					style="width: 99%; height: 25px;"></input></td>
				<td width="15%" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;生效日期：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="validDate" data-options="required:false"
					style="width: 99%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="left">&nbsp;&nbsp;失效日期：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="invalidDate" data-options="required:false"
					style="width: 99%; height: 25px;"></input></td>
				<td width="15%" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最后更新日期：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="lastModifyDate" data-options="required:false"
					style="width: 99%; height: 25px;"></input></td>
			</tr>
		</table>
	</form>
	<div class="esaas-info-buttons">
		<a href="javascript:void(0)" class="easyui-linkbutton " iconCls="icon-ok" onclick="submitForm()" style="width:90px">&nbsp;保&nbsp;存&nbsp;</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="closeForm()" style="width:90px">&nbsp;关&nbsp;闭&nbsp;</a>
	</div>
	<script>		
		$(function() {
		    addTitle("修改");

			var pluginConfId = $.getUrlParam('pluginConfId');
			var confSort = $.getUrlParam('confSort');
			$.restfulGet('../../api/plugin/wt/condition/' + pluginConfId + '/' + confSort,null,function(data){
					$('#ff').form('load', {
						pluginConfId : data.rows.pluginConfId,
						confSort : data.rows.confSort,
						checkItemName : data.rows.checkItemName,
						checkItemSql : data.rows.checkItemSql,
						checkSucCondition : data.rows.checkSucCondition,
						validDate : data.rows.validDate,
						invalidDate : data.rows.invalidDate,
						lastModifyDate : data.rows.lastModifyDate
					});					
			});
		});
	
		function submitForm() {
			if (!$('#ff').form('validate'))
				return;
			var jsonData = $("#ff").serializeJson();
			$.restfulPut('../../api/plugin/wt/condition', jsonData, function(data) {
				window.parent.reloadList();
			});
		};
		
		function closeForm(){
			window.parent.JLEUtil.closewin();
		}
	</script>
</body>
</html>
